package com.mall.user.domain.model;

public record StoreCommitment(String commitment) {
    public StoreCommitment {
        //卖家服务承诺长度不大于500个字符
        if (commitment.length() > 120) {
            throw new IllegalArgumentException("卖家服务承诺长度不大于120个字符");
        }
    }

    public static StoreCommitment of(String commitment) {
        return new StoreCommitment(commitment);
    }
}
